DROP TABLE CRST_RA_CUSTOMERS;

CREATE TABLE CRST_RA_CUSTOMERS
(
	ROW_ID                         VARCHAR (18), 
	CUSTOMER_ID                    NUMBER (15) ,
	PARTY_ID                       NUMBER (15) ,
	PARTY_NUMBER                   VARCHAR (30) ,
	PARTY_TYPE                     VARCHAR (30) ,
	LAST_UPDATE_DATE               DATE ,
	LAST_UPDATED_BY                NUMBER (15) ,
	CREATION_DATE                  DATE ,
	CREATED_BY                     NUMBER (15) ,
	CUSTOMER_NAME                  VARCHAR (50) ,
	CUSTOMER_NUMBER                VARCHAR (30) ,
	ORIG_SYSTEM_REFERENCE          VARCHAR (240) ,
	STATUS                         VARCHAR (1) ,
	LAST_UPDATE_LOGIN              NUMBER (15) ,
	CUSTOMER_TYPE                  VARCHAR (30) ,
	CUSTOMER_PROSPECT_CODE         VARCHAR (8) ,
	CUSTOMER_CLASS_CODE            VARCHAR (30) ,
	PRIMARY_SALESREP_ID            NUMBER (15) ,
	SALES_CHANNEL_CODE             VARCHAR (30) ,
	SIC_CODE                       VARCHAR (30) ,
	ORDER_TYPE_ID                  NUMBER (15) ,
	PRICE_LIST_ID                  NUMBER (15) ,
	ATTRIBUTE_CATEGORY             VARCHAR (30) ,
	ATTRIBUTE1                     VARCHAR (150) ,
	ATTRIBUTE2                     VARCHAR (150) ,
	ATTRIBUTE3                     VARCHAR (150) ,
	ATTRIBUTE4                     VARCHAR (150) ,
	ATTRIBUTE5                     VARCHAR (150) ,
	ATTRIBUTE6                     VARCHAR (150) ,
	ATTRIBUTE7                     VARCHAR (150) ,
	ATTRIBUTE8                     VARCHAR (150) ,
	ATTRIBUTE9                     VARCHAR (150) ,
	ATTRIBUTE10                    VARCHAR (150) ,
	REQUEST_ID                     NUMBER (15) ,
	PROGRAM_APPLICATION_ID         NUMBER (15) ,
	PROGRAM_ID                     NUMBER (15) ,
	PROGRAM_UPDATE_DATE            DATE ,
	ANALYSIS_FY                    VARCHAR (5) ,
	CUSTOMER_CATEGORY_CODE         VARCHAR (30) ,
	CUSTOMER_GROUP_CODE            VARCHAR (1) ,
	CUSTOMER_KEY                   VARCHAR (500), 
	CUSTOMER_SUBGROUP_CODE         VARCHAR (1) ,
	FISCAL_YEAREND_MONTH           VARCHAR (30) ,
	NET_WORTH                      NUMBER,
	NUM_OF_EMPLOYEES               NUMBER,
	POTENTIAL_REVENUE_CURR_FY      NUMBER,
	POTENTIAL_REVENUE_NEXT_FY      NUMBER,
	RANK                           VARCHAR (1) ,
	REFERENCE_USE_FLAG             VARCHAR (1) ,
	TAX_CODE                       VARCHAR (50) ,
	TAX_REFERENCE                  VARCHAR (50) ,
	ATTRIBUTE11                    VARCHAR (150) ,
	ATTRIBUTE12                    VARCHAR (150) ,
	ATTRIBUTE13                    VARCHAR (150) ,
	ATTRIBUTE14                    VARCHAR (150) ,
	ATTRIBUTE15                    VARCHAR (150) ,
	THIRD_PARTY_FLAG               VARCHAR (1) ,
	ACCESS_TEMPLATE_ENTITY_CODE    VARCHAR (1) ,
	PRIMARY_SPECIALIST_ID          NUMBER (15) ,
	SECONDARY_SPECIALIST_ID        NUMBER (15) ,
	COMPETITOR_FLAG                VARCHAR (1) ,
	DUNNING_SITE_USE_ID            NUMBER,
	STATEMENT_SITE_USE_ID          NUMBER,
	ORIG_SYSTEM                    VARCHAR (1) ,
	YEAR_ESTABLISHED               NUMBER,
	COTERMINATE_DAY_MONTH          VARCHAR (6) ,
	FOB_POINT                      VARCHAR (30) ,
	FREIGHT_TERM                   VARCHAR (30) ,
	GSA_INDICATOR                  VARCHAR (1) ,
	SHIP_PARTIAL                   VARCHAR (1) ,
	SHIP_VIA                       VARCHAR (30) ,
	WAREHOUSE_ID                   NUMBER (15) ,
	PAYMENT_TERM_ID                NUMBER (15) ,
	TAX_EXEMPT                     VARCHAR (1) ,
	TAX_EXEMPT_NUM                 VARCHAR (1) ,
	TAX_EXEMPT_REASON_CODE         VARCHAR (1) ,
	JGZZ_FISCAL_CODE               VARCHAR (20) ,
	DO_NOT_MAIL_FLAG               VARCHAR (1) ,
	MISSION_STATEMENT              VARCHAR (2000) ,
	CUSTOMER_NAME_PHONETIC         VARCHAR (320) ,
	TAX_HEADER_LEVEL_FLAG          VARCHAR (1) ,
	TAX_ROUNDING_RULE              VARCHAR (30) ,
	WH_UPDATE_DATE                 DATE ,
	GLOBAL_ATTRIBUTE1              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE2              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE3              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE4              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE5              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE6              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE7              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE8              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE9              VARCHAR (150) ,
	GLOBAL_ATTRIBUTE10             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE11             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE12             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE13             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE14             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE15             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE16             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE17             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE18             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE19             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE20             VARCHAR (150) ,
	GLOBAL_ATTRIBUTE_CATEGORY      VARCHAR (30) ,
	URL                            VARCHAR (2000), 
	LANGUAGE                       VARCHAR (1) ,
	TRANSLATED_CUSTOMER_NAME       VARCHAR (1) ,
	PERSON_PRE_NAME_ADJUNCT        VARCHAR (30) ,
	PERSON_FIRST_NAME              VARCHAR (150) ,
	PERSON_MIDDLE_NAME             VARCHAR (60) ,
	PERSON_LAST_NAME               VARCHAR (150) ,
	PERSON_SUFFIX                  VARCHAR (30) ,
	PERSON_FIRST_NAME_PHONETIC     VARCHAR (60) ,
	PERSON_LAST_NAME_PHONETIC      VARCHAR (60) ,
	SHIP_SETS_INCLUDE_LINES_FLAG   VARCHAR (1) ,
	ARRIVALSETS_INCLUDE_LINES_FLAG VARCHAR (1) ,
	SCHED_DATE_PUSH_FLAG           VARCHAR (1) ,
	OVER_SHIPMENT_TOLERANCE        NUMBER,
	UNDER_SHIPMENT_TOLERANCE       NUMBER,
	OVER_RETURN_TOLERANCE          NUMBER,
	UNDER_RETURN_TOLERANCE         NUMBER,
	ITEM_CROSS_REF_PREF            VARCHAR (30) ,
	DATE_TYPE_PREFERENCE           VARCHAR (20) ,
	DATES_NEGATIVE_TOLERANCE       NUMBER,
	DATES_POSITIVE_TOLERANCE       NUMBER,
	INVOICE_QUANTITY_RULE          VARCHAR (30) ,
	ATTRIBUTE16                    VARCHAR (150) ,
	ATTRIBUTE17                    VARCHAR (150) ,
	ATTRIBUTE18                    VARCHAR (150) ,
	ATTRIBUTE19                    VARCHAR (150) ,
	ATTRIBUTE20                    VARCHAR (150) ,
	DUNS_NUMBER                    NUMBER,
	DUNS_NUMBER_C                  VARCHAR (30) ,
	PARTY_LAST_UPDATE_DATE         DATE ,
	SIC_CODE_TYPE                  VARCHAR (30) ,
	CUSTOMER_ID_N                    NUMBER (15) 
);
